<?php
	abstract class BaseModel extends Base {
		
		abstract public function toJSONObject();
	
		public static function buildJSONObject($obj) {
			if( $obj instanceof BaseModel ) {
				return $obj->toJSONObject();
			} else {
				return $obj;
			}
		}
	}
?>